home *** CD-ROM | disk | FTP | other *** search
/ Hyper Stacks 1994 May / Hyper Stacks (Pacific HiTech)(1994)[Mac].iso / MacTools / AppleEvents-Utilities / AppleEvent Utilities doc / AppleEvent Utilities doc / stack_-1.xml < prev    next >
Encoding:
Extensible Markup Language  |  1994-04-30  |  6.0 KB  |  52 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>32</cardCount>
  7.     <cardID>7608</cardID>
  8.     <listID>2860</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>270</height>
  15.     </cardSize>
  16.     <script>--
  17. -- Utility routines
  18. --
  19.  
  20. On ResetScrollBars
  21. -- leaves all scroll bars nice and tidy.
  22. Unmark all cards
  23. Mark cards where the scroll of background field "Description" ‚↠0
  24. Repeat
  25. Go to next marked card
  26. If not the marked of this card then
  27. Exit repeat
  28. End If
  29. Set scroll of background field "Description" to 0
  30. Unmark this card
  31. End Repeat
  32. End ResetScrollBars
  33.  
  34. On CopyDescription
  35. -- copies the contents of the ‚ÄúDescription‚Äù field to
  36. -- the Clipboard. Works even if the field is locked.
  37. Select char 1 to (the length of background field "Description") ¬¨
  38. of background field "Description"
  39. DoMenu "Copy Text"
  40. Select empty
  41. End CopyDescription
  42.  
  43. On UnlockFields
  44. -- unlocks all background fields.
  45. Repeat with i = 1 to the number of background fields
  46. If not the SharedText of background field i then
  47. Set LockText of background field i to false
  48. End If
  49. End Repeat
  50. End UnlockFields
  51.  
  52. On LockFields
  53. -- locks all background fields.
  54. Repeat with i = 1 to the number of background fields
  55. Set LockText of background field i to true
  56. End Repeat
  57. End LockFields
  58.  
  59. On StripTabs
  60. -- strips tab characters from all fields.
  61. If the LockText of background field "Name" then
  62. Answer "Unlock fields first."
  63. Exit StripTabs
  64. End If
  65. Repeat
  66. Find string Tab
  67. If the result is not empty then
  68. Exit Repeat
  69. End If
  70. Put space into the foundchunk
  71. End Repeat
  72. End StripTabs
  73.  
  74. On SortCards
  75. -- sorts cards by background field ‚ÄúName‚Äù
  76. If the LockText of background field "Name" then
  77. Answer "Unlock fields first."
  78. Exit SortCards
  79. End If
  80. Push this card
  81. Sort this background by field "Name"
  82. Pop card
  83. End SortCards
  84.  
  85. On WhiteOutButton ButtonID
  86. -- paints a white rectangle matching the bounds of
  87. -- the specified background button. Make sure you‚Äôre
  88. -- in background edit mode before invoking this routine.
  89. Choose select tool
  90. Drag from the left of background button id ButtonID, ¬¨
  91. the top of background button id ButtonID to ¬¨
  92. the right of background button id ButtonID, ¬¨
  93. the bottom of background button id ButtonID
  94. DoMenu "Clear Picture"
  95. Choose rect tool
  96. Drag from the left of background button id ButtonID, ¬¨
  97. the top of background button id ButtonID to ¬¨
  98. the right of background button id ButtonID, ¬¨
  99. the bottom of background button id ButtonID
  100. Choose browse tool
  101. End WhiteOutButton
  102.  
  103. On DeleteAllCards
  104. -- gets rid of all cards in this background except one,
  105. -- and empties all fields in the remaining card.
  106. If the LockText of background field "Name" then
  107. Answer "Unlock fields first."
  108. Exit DeleteAllCards
  109. End If
  110. Answer "Really delete all cards?" with "Do It" or "I‚Äôm a Teapot"
  111. If it is not "Do It" then
  112. Exit DeleteAllCards
  113. End If
  114. Go to first card of this background
  115. Put 0 into CardsDeleted
  116. Repeat with i = 1 to the number of cards in this background - 1
  117. Set cursor to busy
  118. DoMenu "Delete Card"
  119. Add 1 to CardsDeleted
  120. If CardsDeleted = 100 then
  121. DoMenu "Compact Stack"
  122. Put 0 into CardsDeleted
  123. End If
  124. End Repeat
  125. Repeat with i = 1 to the number of background fields
  126. If not the SharedText of background field i then
  127. Put empty into background field i
  128. End If
  129. End Repeat
  130. If CardsDeleted ‚↠0 then
  131. DoMenu "Compact Stack"
  132. End If
  133. End DeleteAllCards
  134. </script>
  135.     <background id="2638" file="background_2638.xml" name="XDoc" />
  136.     <background id="10485" file="background_10485.xml" name="Data Types" />
  137.     <card id="7608" file="card_7608.xml" marked="false" name="" owner="2638" />
  138.     <card id="4369" file="card_4369.xml" marked="false" name="" owner="2638" />
  139.     <card id="5783" file="card_5783.xml" marked="false" name="" owner="2638" />
  140.     <card id="5991" file="card_5991.xml" marked="false" name="" owner="2638" />
  141.     <card id="2504" file="card_2504.xml" marked="false" name="" owner="2638" />
  142.     <card id="8688" file="card_8688.xml" marked="false" name="" owner="2638" />
  143.     <card id="8248" file="card_8248.xml" marked="false" name="" owner="2638" />
  144.     <card id="7766" file="card_7766.xml" marked="false" name="" owner="2638" />
  145.     <card id="4177" file="card_4177.xml" marked="false" name="" owner="2638" />
  146.     <card id="5161" file="card_5161.xml" marked="false" name="" owner="2638" />
  147.     <card id="4613" file="card_4613.xml" marked="false" name="" owner="2638" />
  148.     <card id="4957" file="card_4957.xml" marked="false" name="" owner="2638" />
  149.     <card id="3903" file="card_3903.xml" marked="false" name="" owner="2638" />
  150.     <card id="5393" file="card_5393.xml" marked="false" name="" owner="2638" />
  151.     <card id="9075" file="card_9075.xml" marked="false" name="" owner="2638" />
  152.     <card id="8891" file="card_8891.xml" marked="false" name="" owner="2638" />
  153.     <card id="9360" file="card_9360.xml" marked="false" name="" owner="2638" />
  154.     <card id="9552" file="card_9552.xml" marked="false" name="" owner="2638" />
  155.     <card id="6239" file="card_6239.xml" marked="false" name="" owner="2638" />
  156.     <card id="7158" file="card_7158.xml" marked="false" name="" owner="2638" />
  157.     <card id="6638" file="card_6638.xml" marked="false" name="" owner="2638" />
  158.     <card id="6827" file="card_6827.xml" marked="false" name="" owner="2638" />
  159.     <card id="9805" file="card_9805.xml" marked="false" name="" owner="2638" />
  160.     <card id="10014" file="card_10014.xml" marked="false" name="" owner="2638" />
  161.     <card id="7260" file="card_7260.xml" marked="false" name="" owner="2638" />
  162.     <card id="11533" file="card_11533.xml" marked="false" name="" owner="2638" />
  163.     <card id="8187" file="card_8187.xml" marked="false" name="" owner="2638" />
  164.     <card id="59556" file="card_59556.xml" marked="false" name="" owner="2638" />
  165.     <card id="11017" file="card_11017.xml" marked="false" name="" owner="10485" />
  166.     <card id="11344" file="card_11344.xml" marked="false" name="" owner="10485" />
  167.     <card id="2274" file="card_2274.xml" marked="false" name="" owner="10485" />
  168.     <card id="10520" file="card_10520.xml" marked="false" name="" owner="10485" />
  169. </stack>
  170.